package com.sfeir.contacts.dao;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.sfeir.contacts.entity.Contact;

public class HibernateContactDao extends HibernateDaoSupport implements ContactDao {

	@Override
	public Long save(Contact contact) {
		return (Long) getHibernateTemplate().save(contact);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Contact> findAll() {
		return getHibernateTemplate().find("from Contact c");
	}

}
